<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Admin_controller extends Controller
{	
    var $data = array();

    function Admin_controller()
    {
        parent::Controller();
        $this->load->library('zacl');
        $this->load->library('session');
        $this->load->library('simplelogin');
        $this->load->model('user_model');
        $this->load->helper(array('form','date','url','string'));
        $resource = $this->router->class.'_'.$this->router->method;

        $on = false;
        if($this->user_model->check_login()){
                $on = true;
        }


        if($on==false){
                redirect(base_url_admin('login'));
        }

        $act = ($this->router->class) ? $this->router->class : 'product_type';
        $this->data['act'] = $act;
    }	
}